package com.snopy.logistics.config;

import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author snopy
 * @version 1.0.0
 * @classname RedissonConfig
 * @description
 * @email 77912204@qq.com
 * @date 2022/06/22 12:35
 */
//@Configuration
public class RedissonConfig {
    //@Bean(destroyMethod = "shutdown")
    public Redisson redisson(){
        //1.创建配置
        Config config = new Config();
        RedissonClient redisson = Redisson.create(config);

        return (Redisson) redisson;
    }
}
